package model.system;
// Generated Nov 13, 2012 9:40:56 PM by Hibernate Tools 3.2.1.GA


import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

/**
 * SystemNumbering generated by hbm2java
 */
@Entity
@Table(name="system_numbering", schema="public")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class SystemNumbering  implements java.io.Serializable {

    private int id;
    private String nama;
    private String format;
    private String formatGenerator;
    private String formatDelimiter;
    private List<SystemNumberingGen> systemNumberingGens = new ArrayList<>();

    public SystemNumbering() {
    }
	
    @Id 
    @Column(name="id", unique=true, nullable=false)
    public int getId() {
        return this.id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    
    @Column(name="nama", length=20)
    public String getNama() {
        return this.nama;
    }
    
    public void setNama(String nama) {
        this.nama = nama;
    }
    
    @Column(name="format", length=40)
    public String getFormat() {
        return this.format;
    }
    
    public void setFormat(String format) {
        this.format = format;
    }
    
    @Column(name="format_generator", length=40)
    public String getFormatGenerator() {
        return this.formatGenerator;
    }
    
    public void setFormatGenerator(String formatGenerator) {
        this.formatGenerator = formatGenerator;
    }
    
    @Column(name="format_delimiter", length=2)
    public String getFormatDelimiter() {
        return this.formatDelimiter;
    }
    
    public void setFormatDelimiter(String formatDelimiter) {
        this.formatDelimiter = formatDelimiter;
    }
    
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER, mappedBy="systemNumbering")
    @Fetch(value = FetchMode.SUBSELECT)
    @Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
    public List<SystemNumberingGen> getSystemNumberingGens() {
        return this.systemNumberingGens;
    }
    
    public void setSystemNumberingGens(List<SystemNumberingGen> systemNumberingGens) {
        this.systemNumberingGens = systemNumberingGens;
    }
}


